<?php
include(dirname(__FILE__) . '/../../../bootstrap/unit.php');
require_once sfConfig::get('sf_symfony_lib_dir') . '/util/sfToolkit.class.php';
require_once sfConfig::get('sf_symfony_lib_dir') . '/yaml/sfYaml.php';

Logger::configure(dirname(__FILE__) . '/../../log4phpconfig.properties');
$configuration = ProjectConfiguration::getApplicationConfiguration( 'backend', 'test', true);
new sfDatabaseManager($configuration);

$methodName="getMonthlySalary";
$tcount = count(1);

$t = new lime_test($tcount);
$positions = Doctrine::getTable('Position')
      ->createQuery()->execute();
foreach ($positions as $position) {
    $position->logger =  Logger::getLogger('Position');
    echo $position->getName() . " " .  $position->getEmployee() . "\n\tSalario: " . 
            number_format($position->getMonthlySalary(), 2)."\n";
    $errors = $position->validate();

        foreach ($errors as $error => $msg) {
            echo "\tError: $error: $msg\n";
        }
   
}
?>
